package com.fw.service.persistence.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.fw.service.persistence.dto.ParentMerchant;

public interface ParentMerchantDAO extends JpaRepository<ParentMerchant, Long>, JpaSpecificationExecutor<ParentMerchant> {

    @Query("select t from ParentMerchant t where t.parentStatus = :parentStatus")
    public List<ParentMerchant> selectByParentStatus(@Param("parentStatus") String parentStatus);

    @Query("select t from ParentMerchant t where t.parentStatus != :parentStatus")
    public List<ParentMerchant> selectByNotParentStatus(@Param("parentStatus") String parentStatus);
}
